package com.lac.component.test.factory.factory1;

/**
 * @author xiaokuixiao
 * date2025/4/9 13:59
 */
public class CarFactory {
    public static Car getCar(String name){
        switch (name){
            case "奔驰":
                return new BenChi();
            case "宝马":
                return new BMW();
            default:
                break;
        }
        return null;
    }
}